{%- import "macros.html" as macros -%}
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="generator" content="docs.rs {{ crate::BUILD_VERSION }}">
        {%- block meta -%}{%- endblock meta -%}

        {#- Docs.rs styles -#}
        {%- set build_slug = slug::slugify(crate::BUILD_VERSION) -%}
        <link rel="stylesheet" href="/-/static/vendored.css?{{ build_slug }}" media="all" />
        <link rel="stylesheet" href="/-/static/style.css?{{ build_slug }}" media="all" />
        <link rel="stylesheet" href="/-/static/font-awesome.css?{{ build_slug }}" media="all" />

        <link rel="search" href="/-/static/opensearch.xml" type="application/opensearchdescription+xml" title="Docs.rs" />

        <title>{%- block title -%} Docs.rs {%- endblock title -%}</title>

        {%- let csp_nonce = askama::get_value::<String>("csp_nonce").unwrap() -%}

        <script nonce="{{ csp_nonce }}">{%- include "theme.js" -%}</script>
        {%- block css -%}{%- endblock css -%}

        <script defer type="text/javascript" nonce="{{ csp_nonce }}" src="/-/static/menu.js?{{ build_slug }}"></script>
        <script defer type="text/javascript" nonce="{{ csp_nonce }}" src="/-/static/index.js?{{ build_slug }}"></script>
    </head>

    <body class="{% block body_classes %}{% endblock body_classes %}">
        {%- block topbar -%}
          {%- include "header/topbar.html" -%}
        {%- endblock topbar -%}

        {%- block header %}{% endblock header -%}

        {%- block body -%}{%- endblock body -%}

        {%- block javascript -%}{%- endblock javascript -%}
    </body>
</html>
